#!/bin/bash
# progress bar

i=0
str=""
arr=("|" "/" "-" "\\")
while [ $i -le 100 ]
do
	((index=i%4))
	((indexcolor=i%8))
	((color=30+indexcolor))
	printf "\e[0;$color;1m[%-100s][%d%%]%c\n" "$str" "$i" "${arr[$index]}"
	sleep 0.1
	((i++))
	((index++))
	str+='='
done
printf "\n"
